package com.jy.rhin.infra.cda.dao.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jy.rhin.infra.cda.dao.GaoXueYSFDao;
import com.jy.rhin.infra.cda.gxy.GaoXueYSFJCVo;
import com.jy.rhin.infra.cda.gxy.GaoXueYSFVo;
import com.jy.rhin.infra.cda.gxy.GaoXueYSFYYVo;
import com.jy.rhin.infra.cda.mapper.GaoXueYSFMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GaoXueYSFDaoImpl implements GaoXueYSFDao {

    @Resource
    GaoXueYSFMapper gaoXueYSFMapper;

    @Override
    public GaoXueYSFVo get(String gaoXueYSFJLID, String yeWuJGDM) {
        QueryWrapper<GaoXueYSFVo> queryWrapper = new QueryWrapper<GaoXueYSFVo>();
        queryWrapper.eq("YEWUJGDM", yeWuJGDM);
        queryWrapper.eq("GAOXUEYSFJLID", gaoXueYSFJLID);
        return gaoXueYSFMapper.getOne(queryWrapper);
    }

    @Override
    public List<GaoXueYSFYYVo> getYongYao(String gaoXueYSFJLID, String yeWuJGDM) {
        QueryWrapper<GaoXueYSFYYVo> queryWrapper = new QueryWrapper<GaoXueYSFYYVo>();
        queryWrapper.eq("YEWUJGDM", yeWuJGDM);
        queryWrapper.eq("GAOXUEYSFJLID", gaoXueYSFJLID);
        return gaoXueYSFMapper.getYongYao(queryWrapper);
    }

    @Override
    public List<GaoXueYSFJCVo> getJianCha(String gaoXueYSFJLID, String yeWuJGDM) {
        QueryWrapper<GaoXueYSFJCVo> queryWrapper = new QueryWrapper<GaoXueYSFJCVo>();
        queryWrapper.eq("YEWUJGDM", yeWuJGDM);
        queryWrapper.eq("GAOXUEYSFJLID", gaoXueYSFJLID);
        return gaoXueYSFMapper.getJianCha(queryWrapper);
    }

}
